|
3dhall12i2c 2.2.0
|
API for configuring and manipulating 3D Hall 12 I2C Click driver. More...
Topics | |
| 3D Hall 12 I2C Registers List | |
| List of registers of 3D Hall 12 I2C Click driver. | |
| 3D Hall 12 I2C Registers Settings | |
| Settings for registers of 3D Hall 12 I2C Click driver. | |
| 3D Hall 12 I2C MikroBUS Map | |
| MikroBUS pin mapping of 3D Hall 12 I2C Click driver. | |
Functions | |
| void | c3dhall12i2c_cfg_setup (c3dhall12i2c_cfg_t *cfg) |
| 3D Hall 12 I2C configuration object setup function. | |
| err_t | c3dhall12i2c_init (c3dhall12i2c_t *ctx, c3dhall12i2c_cfg_t *cfg) |
| 3D Hall 12 I2C initialization function. | |
| err_t | c3dhall12i2c_default_cfg (c3dhall12i2c_t *ctx) |
| 3D Hall 12 I2C default configuration function. | |
| err_t | c3dhall12i2c_write_reg (c3dhall12i2c_t *ctx, uint8_t reg, uint16_t data_in) |
| 3D Hall 12 I2C write register function. | |
| err_t | c3dhall12i2c_read_reg (c3dhall12i2c_t *ctx, uint8_t reg, uint16_t *data_out) |
| 3D Hall 12 I2C read register function. | |
| void | c3dhall12i2c_set_sample_pin (c3dhall12i2c_t *ctx, uint8_t state) |
| 3D Hall 12 I2C set sample pin function. | |
| uint8_t | c3dhall12i2c_get_int_pin (c3dhall12i2c_t *ctx) |
| 3D Hall 12 I2C get INT pin function. | |
| void | c3dhall12i2c_start_measurement (c3dhall12i2c_t *ctx) |
| 3D Hall 12 I2C start measurement function. | |
| err_t | c3dhall12i2c_read_data (c3dhall12i2c_t *ctx, c3dhall12i2c_data_t *data_out) |
| 3D Hall 12 I2C read data function. | |
API for configuring and manipulating 3D Hall 12 I2C Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
| void c3dhall12i2c_cfg_setup | ( | c3dhall12i2c_cfg_t * | cfg | ) |
3D Hall 12 I2C configuration object setup function.
This function initializes Click configuration structure to initial values.
| [out] | cfg | : Click configuration structure. See c3dhall12i2c_cfg_t object definition for detailed explanation. |
| err_t c3dhall12i2c_default_cfg | ( | c3dhall12i2c_t * | ctx | ) |
3D Hall 12 I2C default configuration function.
This function executes a default configuration of 3D Hall 12 I2C Click board.
| [in] | ctx | : Click context object. See c3dhall12i2c_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | uint8_t c3dhall12i2c_get_int_pin | ( | c3dhall12i2c_t * | ctx | ) |
3D Hall 12 I2C get INT pin function.
This function reads the state of the INT pin.
| [in] | ctx | : Click context object. See c3dhall12i2c_t object definition for detailed explanation. |
| err_t c3dhall12i2c_init | ( | c3dhall12i2c_t * | ctx, |
| c3dhall12i2c_cfg_t * | cfg ) |
3D Hall 12 I2C initialization function.
This function initializes all necessary pins and peripherals used for this Click board.
| [out] | ctx | : Click context object. See c3dhall12i2c_t object definition for detailed explanation. |
| [in] | cfg | : Click configuration structure. See c3dhall12i2c_cfg_t object definition for detailed explanation. |
0 - Success, -1 - Error. See #err_t definition for detailed explanation. | err_t c3dhall12i2c_read_data | ( | c3dhall12i2c_t * | ctx, |
| c3dhall12i2c_data_t * | data_out ) |
3D Hall 12 I2C read data function.
This function reads the temperature, X, Y, Z magnetic field, angle, and magnitude from the device.
| [in] | ctx | : Click context object. See c3dhall12i2c_t object definition for detailed explanation. |
| [out] | data_out | : Pointer to the structure where read data will be stored. See c3dhall12i2c_data_t object definition for detailed explanation. |
0 - Success, -1 - Error. | err_t c3dhall12i2c_read_reg | ( | c3dhall12i2c_t * | ctx, |
| uint8_t | reg, | ||
| uint16_t * | data_out ) |
3D Hall 12 I2C read register function.
This function reads a 16-bit data from the specified register.
| [in] | ctx | : Click context object. See c3dhall12i2c_t object definition for detailed explanation. |
| [in] | reg | : Register address. |
| [out] | data_out | : Pointer to a variable where read data will be stored. |
0 - Success, -1 - Error. | void c3dhall12i2c_set_sample_pin | ( | c3dhall12i2c_t * | ctx, |
| uint8_t | state ) |
3D Hall 12 I2C set sample pin function.
This function sets the state of the SAMPLE pin.
| [in] | ctx | : Click context object. See c3dhall12i2c_t object definition for detailed explanation. |
| [in] | state | : Pin logic state (0 - Low, 1 - High). |
| void c3dhall12i2c_start_measurement | ( | c3dhall12i2c_t * | ctx | ) |
3D Hall 12 I2C start measurement function.
This function triggers a measurement by toggling the SAMPLE pin.
| [in] | ctx | : Click context object. See c3dhall12i2c_t object definition for detailed explanation. |
| err_t c3dhall12i2c_write_reg | ( | c3dhall12i2c_t * | ctx, |
| uint8_t | reg, | ||
| uint16_t | data_in ) |
3D Hall 12 I2C write register function.
This function writes a 16-bit data to the specified register.
| [in] | ctx | : Click context object. See c3dhall12i2c_t object definition for detailed explanation. |
| [in] | reg | : Register address. |
| [in] | data_in | : 16-bit data to be written. |
0 - Success, -1 - Error.